package com.wuseguang.springcloud.dao.repository;

import com.wuseguang.springcloud.entity.SchoolRatingLimits;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface SchoolRatingLimitsRrpository extends JpaRepository<SchoolRatingLimits,Integer> {


    @Transactional
    @Modifying
    @Query(value = "DELETE FROM `school_rating_limits` WHERE `school_id` = ?1 ",nativeQuery = true)
    int deleteBySchoolId(Integer schoolId);
}
